import request from "@/utils/request";

const INVOICE_BASE_URL = "/admin/invoice";

const InvoiceAPI = {
  /**
   * 申请开具发票
   * @param {Object} data 发票申请数据
   * @returns {Promise} 申请结果
   */
  applyInvoice(data) {
    return request({
      url: `${INVOICE_BASE_URL}/applyByBill`,
      method: "post",
      params: data,
    });
  },

  /**
   * 查询发票状态
   * @param {Object} data 查询参数
   * @returns {Promise} 查询结果
   */
  queryInvoice(data) {
    return request({
      url: `${INVOICE_BASE_URL}/query`,
      method: "get",
      params: data,
    });
  },
};

export default InvoiceAPI; 